Test the removal of the whole document#29
Test the removal of the whole document#29espadrine wants to merge 1 commit intojson-patch:masterfrom
Conversation
|
replacing the document with null is not removing the document I believe the behavior of removing In https://github.com/JSON8/patch I return undefined |
While that is compliant with the spec, it is unfortunate, as it breaks the expectation that the result remains a valid JSON document. I would recommend you change it to return null. I believe the behavior we want should be explicit rather than implicit or unspecified. The spec defines the semantics of all that it defines. In the meantime, having divergence in implementations' behavior is unfortunate. |
|
Anyway, this repo contains JSON Patch tests and since your proposed behavior is not specified I'd 👎 |
|
I'm not fond of the idea that removing the object converts it to the 9-character string |
See also json-patch/json-patch2#17